#./makefs-arm32.sh

sudo tunctl -u root -t tap0
sudo ifconfig tap0 172.16.16.10 promisc up
sudo route add -net 172.16.0.0 netmask 255.255.0.0 dev tap0
sudo iptables -t nat -A POSTROUTING -s 172.16.0.0/16 -o eth0 -j MASQUERADE
sudo netfilter-persistent save

sudo qemu-system-arm \
	-M vexpress-a9 \
	-m 512M \
	-kernel u-boot-arm/u-boot \
	-net tap,ifname=tap0,script=no,downscript=no \
	-net nic,macaddr=00:16:3e:00:00:01 \
	-nographic \
	-sd rootfs-arm.ext3
